<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">

	<!-- 
		Replace path to template, title, header and body
		with actual data.
	 -->
	<ui:composition template="/home.xhtml">
			<ui:define name="pageTitle">Cadastro de escala de trabalho</ui:define>
			<ui:define name="pageHeader">Cadastrar Escala de Trabalho</ui:define>
			<ui:define name="body">
				<h:form>
				<h:messages />
				<h:panelGrid columns="2">
					<h:outputLabel value="Descrição" />
					<h:inputText value="#{cadastarEscalaBB.et.descricao}" />
					
					<h:outputLabel value="Dia Trabalho" />
					<h:inputText value="#{cadastarEscalaBB.et.diaTrabalho}" />
					
					<h:outputLabel value="Dia Folga" />
					<h:inputText value="#{cadastarEscalaBB.et.diaFolga}" />
					
					<h:outputLabel value="Considerar Sab/dom/fer" />
					<h:inputText value="#{cadastarEscalaBB.et.consSabDomFer}" />
				</h:panelGrid>
				<h:commandButton value="Salvar" action="#{cadastarEscalaBB.salvar}" />
				<h:commandButton value="Voltar" action="principal" />
				</h:form>
									
				<h:form id="lista">
					<h:dataTable value="#{cadastarEscalaBB.escala}" var ="escala" border="1">
					<f:facet name="header">Listagem de Escala</f:facet>
					<h:column>
						<f:facet name="header">Descrição</f:facet>
						#{escala.descricao}
					</h:column>	
					
					<h:column>
						<f:facet name="header">Dia Trabalho</f:facet>
						#{escala.diaTrabalho}
					</h:column>	
					
					<h:column>
						<f:facet name="header">Dia Folga</f:facet>
						#{escala.diaFolga}
					</h:column>	
					
					<h:column>
						<f:facet name="header">Sab/Dom/Fer</f:facet>
						#{escala.consSabDomFer}
					</h:column>
					</h:dataTable>
				</h:form>		
				
			</ui:define>
	</ui:composition>

</html>